<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>跳转提示</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="/static/assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="/static/assets/css/app.css">
    <script src="/static/assets/js/jquery.min.js"></script>
</head>

<body data-type="widgets">
<script src="/static/assets/js/theme.js"></script>
<div class="am-g tpl-g">

    <!-- 风格切换 -->
    <div class="tpl-skiner">
        <div class="tpl-skiner-toggle am-icon-cog">
        </div>
        <div class="tpl-skiner-content">
            <div class="tpl-skiner-content-title">
                选择主题
            </div>
            <div class="tpl-skiner-content-bar">
                <span class="skiner-color skiner-white" data-color="theme-white"></span>
                <span class="skiner-color skiner-black" data-color="theme-black"></span>
            </div>
        </div>
    </div>

    <!-- 内容区域 -->
    <div class="row-content am-cf">
        <div class="widget am-cf">
            <div class="widget-body">
                <div class="tpl-page-state">

                    <?php switch ($code) {?>
                    <?php case 1:?>
                    <div class="tpl-page-state-title am-text-center tpl-error-title"><span class="am-icon-check"></span></div>
                    <div class="tpl-error-title-info">Success.</div>
                    <?php break;?>
                    <?php case 0:?>
                    <div class="tpl-page-state-title am-text-center tpl-error-title"><span class="am-icon-close"></span></div>
                    <div class="tpl-error-title-info">Fail.</div>
                    <?php break;?>
                    <?php } ?>

                    <div class="tpl-page-state-content tpl-error-content">
                        <p><?php echo(strip_tags($msg));?></p>
                        <a id="href" href="<?php echo($url);?>" class="am-btn am-btn-secondary am-btn-xl">
                            <span class="am-icon-send-o"></span> 继续
                            (<span id="wait"><?php echo($wait);?></span>)</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="/static/assets/js/app.js"></script>
<script type="text/javascript">
    (function () {
        var wait = document.getElementById('wait');
        href = document.getElementById('href').href;
        var interval = setInterval(function () {
            var time = --wait.innerHTML;
            if (time <= 0) {
                location.href = href;
                clearInterval(interval);
            }
        }, 1000);
    })();
</script>
</body>
</html>